﻿
@{
    ViewBag.Title = "part_SubIp";
}
<link href="/assets/global/css/plugins.css" rel="stylesheet" type="text/css" />
<label class="col-md-3 control-label">服务器副IP:</label>
<div class="col-md-9">
    @*@Html.DropDownList("SubIPId", (SelectList)ViewBag.subIpIds, "请选择副IP", new { @class = "form-control input-large" })*@
    <select name="SubIPId" id="SubIPId" placeholder = "可多选" class="form-control input-large select2" multiple>
        @foreach (var s in ViewBag.subIpIds)
        {
            <option value="@s.Value" @(Model != null&&Model.SubIPIds!=null && Model.SubIPIds.Contains(s.Value) ? "selected" : "")>@s.Text</option>
        }
    </select>
</div>
<script type="text/javascript" src="/assets/global/plugins/select2/select2.min.js"></script>
<script>
    $(function () {
        $('#SubIPId').select2({
            placeholder: "",
            allowClear: false
        });
    })
</script>

